import { debounce } from '@/utils/util';
export const useTableFormSearch = (setPaginationConfig, setSearchQuery, getList, clearSearchQuery: any = null) => {
    // 搜索回调
    const handleSearch = debounce((query) => {
        setPaginationConfig({
            current: 1
        });
        if (clearSearchQuery) {
            clearSearchQuery();
        }
        setSearchQuery({
            ...query
        });
        getList();
    }, 300);
    return {
        handleSearch
    };
};